package com.company.project.model;

import cn.hutool.core.date.DateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

public class CarPoolVo {

    private Long carId;

    /**
     * 联系电话
     */
    private String telephone;

    /**
     * 哪到哪
     */
    private String destination;

    /**
     * 乘车方式
     */
    private String ttansportation;

    /**
     * 发车时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Column(name = "departure_time")
    private Date departureTime;

    /**
     * 详情
     */
    private String content;


    /**
     * 备注
     */
    private String remark;


    /**星期几*/
    private String departureTimeWeek;

    public String getDepartureTimeWeek() {
        return new DateTime(departureTime).dayOfWeekEnum().toChinese();
    }

    public void setDepartureTimeWeek(String departureTimeWeek) {
        this.departureTimeWeek = departureTimeWeek;
    }

    /**
     * @return car_id
     */
    public Long getCarId() {
        return carId;
    }

    /**
     * @param carId
     */
    public void setCarId(Long carId) {
        this.carId = carId;
    }

    /**
     * 获取联系电话
     *
     * @return telephone - 联系电话
     */
    public String getTelephone() {
        return telephone;
    }

    /**
     * 设置联系电话
     *
     * @param telephone 联系电话
     */
    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    /**
     * 获取哪到哪
     *
     * @return destination - 哪到哪
     */
    public String getDestination() {
        return destination;
    }

    /**
     * 设置哪到哪
     *
     * @param destination 哪到哪
     */
    public void setDestination(String destination) {
        this.destination = destination;
    }

    /**
     * 获取乘车方式
     *
     * @return ttansportation - 乘车方式
     */
    public String getTtansportation() {
        return ttansportation;
    }

    /**
     * 设置乘车方式
     *
     * @param ttansportation 乘车方式
     */
    public void setTtansportation(String ttansportation) {
        this.ttansportation = ttansportation;
    }

    /**
     * 获取发车时间
     *
     * @return departure_time - 发车时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Date getDepartureTime() {
        return departureTime;
    }

    /**
     * 设置发车时间
     *
     * @param departureTime 发车时间
     */
    public void setDepartureTime(Date departureTime) {
        this.departureTime = departureTime;
    }

    /**
     * 获取详情
     *
     * @return content - 详情
     */
    public String getContent() {
        return content;
    }

    /**
     * 设置详情
     *
     * @param content 详情
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * 获取备注
     *
     * @return remark - 备注
     */
    public String getRemark() {
        return remark;
    }

    /**
     * 设置备注
     *
     * @param remark 备注
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }
}